package android.slc.appbase.ui.utils;

import android.app.DatePickerDialog;
import android.content.Context;

import java.util.Calendar;

/**
 * 原生日期选择对话框工具
 */
public class DateSelectDialogUtils {
    /**
     * 显示日期对话框
     * @param context
     * @param calendar
     * @param onDateSetListener
     */
    public static void showDateSelectDialog(Context context, Calendar calendar, DatePickerDialog.OnDateSetListener onDateSetListener) {
        new DatePickerDialog(context, onDateSetListener, calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH),
                calendar.get(Calendar.DAY_OF_MONTH)).show();
    }
}
